package tp.pr2;

public class Garbage extends Item {
	public Garbage(String id, String description, int recycledMaterial){
		super(id, description); times = 1; this.recycledMaterial = recycledMaterial;
	}

	public boolean canBeUsed() {
		return times != 0;
	}

	public boolean use(RobotEngine r, Place p) {
		if (times != 0){
			r.addRecycledMaterial(recycledMaterial);
			times--;
			return true;
		}else
			return false;
	}
	private int recycledMaterial;
}
